#ifndef SLAVEFRAME_H
#define SLAVEFRAME_H

#include <wx/mdi.h>
#include <wx/gdicmn.h>

class D_DrawFrm;
class wxScrollBar;

class SlaveFrame : public wxMDIChildFrame{
	public:
	SlaveFrame(D_DrawFrm *parent, wxWindowID id = 1, const wxString &title = wxT("D-Draw"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE);
	~SlaveFrame();
	void InformForClosing();
	static bool IsValid();
	void OnSize(wxSizeEvent& event);
	void OnLeftClick(wxMouseEvent& event);
	void OnLeftHold(wxMouseEvent& event);
	void OnMouseMove(wxMouseEvent& event);
	void OnPaint(wxPaintEvent& event);
	void OnScroll(wxScrollEvent& event);
	wxPoint& GetRenderOffset();
	void UpdatePointer(wxPoint* position);
	private: 
	bool m_parent_triggered_close;
	D_DrawFrm* m_parent;
	wxScrollBar* m_sbar1;
	wxScrollBar* m_sbar2;
	static bool m_is_valid;
	
	DECLARE_EVENT_TABLE();
	};

#endif